Coq as a Metatheory for Nuprl with Bar Induction

نویسندگان

  • Vincent Rahli
  • Mark Bickford
چکیده

These past few years, we have been experimenting in Nuprl with versions of Brouwer’s Bar Induction principle. Until recently we had no formal proof that these rules are valid Nuprl reasoning principles. Thanks to our formalization of Nuprl’s metatheory in Coq, we can now rigorously check whether these principles are consistent with Nuprl. In this paper we present a proof, using our Coq framework, of the validity of Brouwer’s Bar Induction principle on sequences of natural numbers. To prove this result we added all Coq functions from natural numbers to natural numbers to Nuprl’s computation system. Introduction. Nuprl [9, 3] is a dependent type theory à la Martin-Löf [15] based on an untyped functional programming language. Nuprl has a rich type theory including identity (or equality) types, a hierarchy of universes, W types, quotient types [10], set types, union and (dependent) intersection types [14], image types [16], PER types [4], simulation types [18], and partial types [11]. Type checking is undecidable but in practice this is mitigated by type inference and checking heuristics implemented as tactics. Nuprl types are defined as partial equivalence relations (PERs) on closed terms [2, 1, 11]. We have implemented Nuprl’s PER semantics in Coq and verified a large number of its inference rules [5, 6]. Bar Induction. These past few years we have been experimenting with versions of Brouwer’s Bar Induction principle [8, 19]. In [7], we showed how to build parametrized families of W types using a general form of Bar Induction. We present here our first attempt at proving that this rule is valid w.r.t. Nuprl PER semantics. The rule we have proved is: H ⊢ ↓(X 0 norm(c, 0)) BY [BarInduction] (dec) H , n : N, s : Nn ⊢ B n s ∨ ¬B n s (bar) H , s : N ⊢ ↓∃n : N. B n norm(s, n) (imp) H , n : N, s : Nn ,m : B n s ⊢ X n s (ind) H , n : N, s : Nn , x : (∀m : N. X (n+ 1) ext(s, n,m)) ⊢ X n s where norm(s, n) = λx.if x<0 then ⊥ else if x<n then s(x) else ⊥ ext(s, n,m) = λx.if x =Z n then m else s(x) ↓T = {Unit | T } The normalized sequence norm(s, n) returns s(x) for inputs x between 0 and n, and otherwise returns ⊥. Our first attempt to verify this rule did not use norm and, to use [BarInduction], required one to, in addition to the above subgoals, prove that X is a well-formed function of type n:N → Nn → Type. This is undesirable and can be avoided using norm. As mentioned in [7], we can define a bar recursion operator and using this squashed bar induction rule (using the squashing operator ↓), we can prove that bar recursion is a realizer for bar induction. We have proved that this rule is true in our impredicative metatheory (in Prop) following Dummett’s “standard” classical proof [12, pp.55]. Our Coq implementation is available at

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Exercising Nuprl's Open-Endedness

Nuprl is an interactive theorem prover that implements an extensional constructive type theory, where types are interpreted as partial equivalence relations on closed terms. Nuprl is both computationally and type-theoretically open-ended in the sense that both its computation system and its type theory can be extended as needed by checking a handful of conditions. For example, Doug Howe charact...

متن کامل

Ëøóöý Ó Ö Áòù Blockinøóò Ò Aeùôöð Îò Blockinòø Êðð 1⋆¸ååö Óö 2 ¸ Òò Êóöø ĺ Óò×øøøðð 2

Abstra t. In order to turn Nuprl's logi into a fully intuitionisti logi , we are urrently experimenting with versions of Brouwer's bar indu tion prin iple. Using our formalization of Nuprl's metatheory in Coq, we have proved the lassi al validity of two su h prin iples: one for sequen es of numbers that involved little hanges to the system, and a more general one for sequen es of losed terms wi...

متن کامل

Towards a Formally Verified Proof Assistant

This technical report describes our progress towards a formally verified version of the Nuprl Proof Assistant. We define a deep embedding of most of Nuprl into Coq. Among others, it includes a nominal-style definition of the Nuprl language, reduction rules, a coinductively defined computational equivalence, and the curry-style type system where types are defined as partial equivalence relations...

متن کامل

Primitive Recursion for Higher-Order Abstract Syntax

Higher-order abstract syntax is a central representation technique in logical frameworks which maps variables of the object language into variables in the meta-language. It leads to concise encodings, but is incompatible with functions defined by primitive recursion or proofs by induction. In this paper we propose an extension of the simply-typed lambda-calculus with iteration and case construc...

متن کامل

Innovations in computational type theory using Nuprl

For twenty years the Nuprl (“new pearl”) system has been used to develop software systems and formal theories of computational mathematics. It has also been used to explore and implement computational type theory (CTT) – a formal theory of computation closely related to Martin-Löf’s intuitionistic type theory (ITT) and to the calculus of inductive constructions (CIC) implemented in the Coq prov...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2015